package com.hyt.it.ogt.kq.service.gov.service.impl;

import com.alibaba.fastjson.JSON;
import com.hyt.common.apiInfor.ApiResponse;
import com.hyt.core.util.UUIDUtils;
import com.hyt.it.ogt.kq.common.config.ConfigManager;
import com.hyt.it.ogt.kq.service.gov.feign.customerthird.CustomerthirdClient;
import com.hyt.it.ogt.kq.service.gov.feign.customerthird.model.ExamStudentDTO;
import com.hyt.it.ogt.kq.service.gov.feign.customerthird.model.ZjwExamDTO;
import com.hyt.it.ogt.kq.service.gov.feign.customerthird.model.ZjwExamStudentDTO;
import com.hyt.it.ogt.kq.service.gov.feign.customerthird.model.ZjwKwapDTO;
import com.hyt.it.ogt.kq.service.gov.feign.ks.KsClient;
import com.hyt.it.ogt.kq.service.gov.feign.ks.model.PushKsSubjectParam;
import com.hyt.it.ogt.kq.service.gov.feign.ks.model.PushTimeSubjectParam;
import com.hyt.it.ogt.kq.service.gov.feign.tps.GovTpsClient;
import com.hyt.it.ogt.kq.service.gov.model.entity.CustomArrange;
import com.hyt.it.ogt.kq.service.gov.model.entity.Time;
import com.hyt.it.ogt.kq.service.gov.model.entity.TimeSubject;
import com.hyt.it.ogt.kq.service.gov.model.param.*;
import com.hyt.it.ogt.kq.service.gov.model.vo.ExamAgreementVO;
import com.hyt.it.ogt.kq.service.gov.model.vo.TaskInfoVO;
import com.hyt.it.ogt.kq.service.gov.model.vo.zjw.*;
import com.hyt.it.ogt.kq.service.gov.service.*;
import com.hyt.it.ogt.kq.service.model.entity.Candidate;
import com.hyt.it.ogt.kq.service.model.entity.CandidateSubject;
import com.hyt.it.ogt.kq.service.model.entity.Subject;
import com.hyt.loginfo.model.User;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

/**
 * 住建委
 */
@Service
@Slf4j
public class ZjwServiceImpl implements IZjwService {

    @Resource
    private GovTpsClient govTpsClient;
    @Resource
    private ConfigManager configManager;
    @Resource
    private ITaskService iTaskService;
    @Resource
    private ISubjectService iSubjectService;
    @Resource
    private ITimeService iTimeService;
    @Resource
    private ICandidateService iCandidateService;
    @Resource
    private ICandidateSubjectService iCandidateSubjectService;
    @Resource
    private ICustomArrangeService iCustomArrangeService;
    @Resource
    private CustomerthirdClient customerthirdClient;
    @Resource
    private ITimeSubjectService iTimeSubjectService;
    @Resource
    private KsClient ksClient;
    @Resource
    private RedisTemplate redisTemplate;

    @Transactional(rollbackFor = Exception.class)
    // @Async("executor")
    @Override
    public void getExamData(String gwfl, User user) throws Exception {
        String zjwSelectExamAppkey = configManager.getZjwSelectExamAppkey();
        String zjwSelectKWAPAppKey = configManager.getZjwSelectKWAPAppKey();
        String zjwSelectExamStudentAppKey = configManager.getZjwSelectExamStudentAppKey();
        String sid = configManager.getZjwSid();
        String requestUrl = configManager.getZjwRequestUrl();
        String officeId = user.getOfficeid();
        //获取考试
        List<ZjwExamVO> zjwExamList = this.getSelectExam(zjwSelectExamAppkey, sid, requestUrl, gwfl);
        String onLineConfigStr = "[{\"id\":\"00cbdad7bd2ea11f2a671fe379414547\",\"configType\":\"exam_on\",\"configAttribute\":\"number\",\"configName\":\"考生屏幕快照抓拍频率\",\"configCode\":\"screenShotTime\",\"configValue\":\"0\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":65,\"remark\":\"抓拍频率：0-12\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"011df9ae92e2ed90a8d5a13f230f4226\",\"configType\":\"video_monitoring\",\"configAttribute\":\"number\",\"configName\":\"抓拍间隔分钟数\",\"configCode\":\"videoShotsMins\",\"configValue\":\"2\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":20,\"remark\":\"视频监控设置-抓拍间隔分钟数\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"02ea24375ccee004dfcf9e25763cbefe\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"身份验证\",\"configCode\":\"authentication\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":17,\"remark\":\"考前-是否设置考生身份验证,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"040fba7dfad334c9026e4f7e1430f428\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"手机端考试\",\"configCode\":\"examMobile\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":46,\"remark\":\"考中-手机端考试,1表示是，0表示\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"097142c893b4869b299c87b59dfe0c88\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"客户端考试-摄像头检测\",\"configCode\":\"checkClientCamera\",\"configValue\":\"true\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":78,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"0b208e3ec987771b1b454cd407a88e3b\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"身份验证照片\",\"configCode\":\"authenticationPhoto\",\"configValue\":\"true\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":25,\"remark\":\"视频监控设置-是否开启身份验证照片对比,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"0ea8587751299e4134104a43154bbe2d\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"手机端考试-麦克风检测\",\"configCode\":\"checkPhoneMic\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":84,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"12cdc264aa0c28b84efa8ce056a36794\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"考试前-开启语音互动\",\"configCode\":\"talkService\",\"configValue\":\"true\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":73,\"remark\":\"考试前-是否开启语音互动，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"134bb2c81f62071edab29ece7d659482\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"PC视频回放\",\"configCode\":\"videoPCPlayBack\",\"configValue\":\"true\",\"configGroup\":null,\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":40,\"remark\":\"视频监控设置-是否开启PC视频回放,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"197920345011fa4dd96f6e3cce31c2ac\",\"configType\":\"video_monitoring\",\"configAttribute\":\"number\",\"configName\":\"移动监控设备掉线提醒间隔分钟数\",\"configCode\":\"appOffLineRemindMins\",\"configValue\":\"2\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":44,\"remark\":\"视频监控设置-自定义移动监控设备掉线提醒间隔分钟数\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"1a061c56d9519d31a32b6c4864b417e3\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-设备检测-云考试app考试-扬声器检测\",\"configCode\":\"checkAppAudio\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":92,\"remark\":\"考中-是否开启扬声器检测，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"1a89fa73a0e3b0ff9650e52922feb0e6\",\"configType\":\"exam_on\",\"configAttribute\":\"number\",\"configName\":\"切屏交卷时间\",\"configCode\":\"overScreenCommitTime\",\"configValue\":\"30\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":63,\"remark\":\"考中-切屏交卷时间（秒）\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"1c940437fd6601f3dd2aa68252ff0195\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"人脸比对\",\"configCode\":\"faceContrast\",\"configValue\":\"true\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":23,\"remark\":\"视频监控设置-是否开启人脸对比,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"22c0ce7c9f98b0a384d8633b25449e77\",\"configType\":\"exam_before\",\"configAttribute\":\"number\",\"configName\":\"开始考试后***分钟不能登录\",\"configCode\":\"delayLogOnMins\",\"configValue\":\"30\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":16,\"remark\":\"考前-开始考试后允许登录分钟数\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"2668511cfac5480e5adbc642a40a6af5\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"开启考生承诺\",\"configCode\":\"openPromise\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":57,\"remark\":\"是否在考生须知中增加考生承诺弹框。\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"28891ecf9aa60fb73432f494578b7384\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"PC端登录拍照\",\"configCode\":\"logOnPCPhoto\",\"configValue\":\"false\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":26,\"remark\":\"视频监控设置-是否开启PC端登录拍照照片对比,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"2cfd2b7eb40bb1b6914a9f1538160c8a\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"视频监控\",\"configCode\":\"videoMonitoring\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":19,\"remark\":\"视频监控设置-是否开启视频监控,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"2e12477a90186a22e886c68a0e91bbc5\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"视频回放\",\"configCode\":\"videoPlayBack\",\"configValue\":\"true\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":28,\"remark\":\"视频监控设置-是否开启视频回放,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"2ef2a73357b60d408a9bef75723a53cd\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-云考试app-侦测拨打电话行为\",\"configCode\":\"appTakePhone\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":90,\"remark\":\"考中-是否侦测拨打电话行为，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"3914423a0274f15d2692f0369d27f2d4\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"翻译\",\"configCode\":\"translate\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":null,\"isVisible\":true,\"sort\":54,\"remark\":\"考中-翻译\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"42bf36911c519aaf122318c2825bed3c\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"网页版考试\",\"configCode\":\"examWeb\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":45,\"remark\":\"考中-网页版考试,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"43bfff715db8f7fff81fa0152e20919a\",\"configType\":\"video_monitoring\",\"configAttribute\":\"text\",\"configName\":\"移动监控位置摆放要求\",\"configCode\":\"locationRequirements\",\"configValue\":\"除考试规定的物品外，桌面禁止摆放其他物品。移动机位放置在45度斜后方，可以录制到考生侧面及考试设备。\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":22,\"remark\":\"视频监控设置-自定义移动监控设备摆放位置要求（60个字）\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"43d8ec0a8f5ce5541254b5d3fc095597\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"锁定考试\",\"configCode\":\"lockExam\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":51,\"remark\":\"考中-是否设置锁定考试,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"45ab01f2e0366204a94254c4666daa3b\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"统一开考 统一结束\",\"configCode\":\"unifiedStartEnd\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":34,\"remark\":\"考前-是否设置为统一开考统一结束,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"470eeda3ec2e12baee1a34eb91e2f49c\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考生屏幕快照\",\"configCode\":\"screenShot\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":64,\"remark\":\"考中-考生屏幕快照,1表示是，0表示\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"495285e2ab5eb2d70ff3107efb232e72\",\"configType\":\"exam_on\",\"configAttribute\":\"text\",\"configName\":\"乱序排除题型列表\",\"configCode\":\"disorderSetExcludeItemTypeList\",\"configValue\":\"\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":25,\"remark\":\"\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"4b0211028c7c02162a1203329073e889\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"客户端考试-麦克风检测\",\"configCode\":\"checkClientMic\",\"configValue\":\"true\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":80,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"4be72773c44109da8cfe9274ef88dbf7\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"默认跳过拍照验证\",\"configCode\":\"passMobileTakePhoto\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":58,\"remark\":\"考中-手机端考试默认跳过拍照验证,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"4d206653c4a6be20885b0a06febef0de\",\"configType\":\"exam_after\",\"configAttribute\":\"checkbox\",\"configName\":\"分数线\",\"configCode\":\"scoreGrade\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-s-operation\",\"isVisible\":null,\"sort\":6,\"remark\":\"考后-是否设置分数线,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"509f057db2f1fc801135f0319bd57419\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"选项乱序设置\",\"configCode\":\"optionsDisorderSet\",\"configValue\":\"true\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":12,\"remark\":\"考中-选项乱序设置,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"538d7a8d134cc4c96a29b029763c056a\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"双机位监控\",\"configCode\":\"dualMonitoring\",\"configValue\":\"true\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":21,\"remark\":\"视频监控设置-是否开启双监控,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"550f75e891061d90baaf33f18fcf6fae\",\"configType\":\"exam_before\",\"configAttribute\":\"number\",\"configName\":\"可提前***分钟登录\",\"configCode\":\"earlyLogOnMins\",\"configValue\":\"30\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":14,\"remark\":\"考前-允许提前登录分钟数\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"56708fe6d722d277df446f6bda5b6e79\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-设备检测-云考试app考试-麦克风检测\",\"configCode\":\"checkAppMic\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":93,\"remark\":\"考中-是否开启麦克风检测，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"58c8e9bd5ecceebe128a567505afb520\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-云考试app-禁用系统截屏\",\"configCode\":\"appScreenShot\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":89,\"remark\":\"考中-是否禁用系统截屏，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"58ff020ebe7db66ca35e47c100e5e122\",\"configType\":\"exam_on\",\"configAttribute\":\"number\",\"configName\":\"限制考生登录考试次数\",\"configCode\":\"loginCount\",\"configValue\":\"0\",\"configGroup\":\"\",\"iconClass\":null,\"isVisible\":true,\"sort\":52,\"remark\":\"考中-限制考生登录考试次数\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"59b22f5956c57057f0fd5946010036f2\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考中-显示小题分值\",\"configCode\":\"childQuestionScore\",\"configValue\":\"true\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":74,\"remark\":\"考中-显示小题分支，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"5c49b44b1d2a840460d820808d499740\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"答题水印\",\"configCode\":\"answerWatermark\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":49,\"remark\":\"考中-是否设置答题水印,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"5c6ea0b1d75d1d4ba031902463f30268\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-云考试app-侦测收发短信行为\",\"configCode\":\"appSendMessage\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":97,\"remark\":\"考中-是否侦测收发短信行为，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"63c59eb546003ed7f9edae4062951e8a\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-云考试app-投屏检测\",\"configCode\":\"appProjectionCheck\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":87,\"remark\":\"考中-是否开启投屏检测，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"650d73cdf8e9e5b60ffaa7d6dffad667\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"手机端考试-摄像头检测\",\"configCode\":\"checkPhoneCamera\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":82,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"671573e6c3c2603c9a4b421b93ed4ce9\",\"configType\":\"video_monitoring\",\"configAttribute\":\"number\",\"configName\":\"交卷后延时监控时间\",\"configCode\":\"delayMonitorVideoTime\",\"configValue\":\"60\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":19,\"remark\":\"交卷后延时监控时间\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"681bc773504ede55e1cb0c3be8ccedf7\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"切换屏幕\",\"configCode\":\"overScreen\",\"configValue\":\"false\",\"configGroup\":\"\",\"iconClass\":\"el-icon-s-platform\",\"isVisible\":true,\"sort\":2,\"remark\":\"考中-是否允许切换屏幕,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"6c5bf132b447d4bd9951b3c3750635fb\",\"configType\":\"exam_on\",\"configAttribute\":\"number\",\"configName\":\"切屏离开时间\",\"configCode\":\"overScreenLeaveTime\",\"configValue\":\"5\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":53,\"remark\":\"考中-切屏离开时间（秒）\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"6df1bd6b58fd0753f8d6727842186073\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-云考试app-分屏检测\",\"configCode\":\"appSplitScreenCheck\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":88,\"remark\":\"考中-是否开启分屏检测，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"7200b1d4aa34f64ae90e4c82287b8204\",\"configType\":\"video_monitoring\",\"configAttribute\":\"text\",\"configName\":\"移动监控设备掉线提醒信息\",\"configCode\":\"appOffLineRemind\",\"configValue\":\"\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":37,\"remark\":\"视频监控设置-自定义移动监控设备掉线提醒信息（60个字）\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"720ff46395f49fb4b42814b85527b0cf\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"网页版考试-麦克风检测\",\"configCode\":\"checkWebMic\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":76,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"742c5c5779af269732fecd4a13778dfb\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"手机号登录\",\"configCode\":\"phoneNumLogin\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":null,\"isVisible\":true,\"sort\":72,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"79aae3773c7dae45c4f5619f34dc8934\",\"configType\":\"exam_after\",\"configAttribute\":\"number\",\"configName\":\"合格分数线\",\"configCode\":\"passScore\",\"configValue\":\"0\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":7,\"remark\":\"考后-合格分数线(大于等于)\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"7aac4572c7e740682d63dfc49c021830\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"答题限制回退\",\"configCode\":\"answerLimitBack\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":null,\"isVisible\":true,\"sort\":25,\"remark\":\"\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"7ef7c6f4e670050d9b23c39fbacb7d43\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"客户端考试-网络检测\",\"configCode\":\"checkClientNetwork\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":81,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"802a6d99d9bad385d0b76b04d3152d9a\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-云考试app-手机app考试\",\"configCode\":\"examApp\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":86,\"remark\":\"考中-是否允许使用app进行考试，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"83f5c8ec0675de899efd946cfa1e1807\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"是否可以提前登录\",\"configCode\":\"earlyLogOn\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":13,\"remark\":\"考前-是否设置可以提前登录,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"85f9777b0305a2e869e766fed9ae4432\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-设备检测-云考试app考试-摄像头检测\",\"configCode\":\"checkAppCamera\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":91,\"remark\":\"考中-是否开启摄像头检测，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"87032ea39fe59db5457203c809ebff36\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"禁止复制\",\"configCode\":\"forbidCopy\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-document-copy\",\"isVisible\":true,\"sort\":4,\"remark\":\"考中-是否禁止复制,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"8732de7373389f23096ada4bef1a3053\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"手机端考试-网络检测\",\"configCode\":\"checkPhoneNetwork\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":85,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"88d5535acdda8d4713e2f0848cfd6d2c\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"手机端考试-扬声器检测\",\"configCode\":\"checkPhoneAudio\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":83,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"8bf7d3eccdd44c07c1e4f2e161c3a0e0\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"开启考生端申请\",\"configCode\":\"applyPassAuthentication\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":17,\"remark\":\"考前-是否开启考生端申请, true 表示是，false表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"8d7a9837a5f41f45113fd8445ea9dfe9\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"客户端考试-扬声器检测\",\"configCode\":\"checkClientAudio\",\"configValue\":\"true\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":79,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"8f5662860a04d3bc56bfbf8f280144c5\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"视频行为分析\",\"configCode\":\"videoActionAnalysis\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":30,\"remark\":\"视频行为分析设置-是否开启视频行为分析,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"901308f3fa3df6457f484b2b4bc0c1d2\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"网页版考试-扬声器检测\",\"configCode\":\"checkWebAudio\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":75,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"91789b011d56020195cb9d797b223166\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"网页版考试-网络检测\",\"configCode\":\"checkWebNetwork\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":77,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"9231c10af0c644004c8eb806c7c41773\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"移动端照片\",\"configCode\":\"appPhoto\",\"configValue\":\"true\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":24,\"remark\":\"视频监控设置-是否开启移动端照片对比,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"941715aa187e05bb8c0f198d464d211d\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"计算器显示\",\"configCode\":\"calculatorVisiable\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":null,\"isVisible\":true,\"sort\":73,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"a2cfc1b2e6a9b2ce3e40ac3b8f0be2fc\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"云考试客户端\",\"configCode\":\"examClient\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":36,\"remark\":\"考中-是否开启云考试客户端,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"a650193d6d7e09d023c2565a33533dfc\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"网页版考试-摄像头检测\",\"configCode\":\"checkWebCamera\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":74,\"remark\":null,\"taskId\":null,\"isDelFlag\":false},{\"id\":\"a9ab28544799dd222627e18566567326\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"准考证登录\",\"configCode\":\"admissionNumLogin\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":47,\"remark\":\"考前-是否设置为准考证登录,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"aa2b0ed4f11f985cf5e3ac1d3c2fd242\",\"configType\":\"exam_after\",\"configAttribute\":\"checkbox\",\"configName\":\"人工判分\",\"configCode\":\"manualScore\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":29,\"remark\":\"考后-是否开启人工判分,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"b0a24ff7f90bcb42c6ee96cb17484a97\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-切屏控制\",\"configCode\":\"screenShotControl\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":91,\"remark\":\"考中-云考试客户端、云考试app是否支持切屏控制，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"b7a728044b4a7de7fe7b06ffb564f058\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"默认跳过设备检测\",\"configCode\":\"passMobileVideoDeviceCheck\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":57,\"remark\":\"考中-手机端考试默认跳过设备检测,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"ba8523d9d6eb817c918bcc5dc099cd6d\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"开考后允许登录\",\"configCode\":\"delayLogOn\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":15,\"remark\":\"考前-是否设置开始考后可以登录,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"bc1d28cda9abf6f3bf89173381965c50\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"大题乱序\",\"configCode\":\"topicDisorder\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":25,\"remark\":\"\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"bd9f4c5199616b3efaff603eecf1b6f7\",\"configType\":\"exam_before\",\"configAttribute\":\"number\",\"configName\":\"考生人脸识别失败次数\",\"configCode\":\"authenticationFaildCount\",\"configValue\":\"3\",\"configGroup\":\"1\",\"iconClass\":null,\"isVisible\":true,\"sort\":17,\"remark\":\"考前-考生人脸识别失败次数\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"bfce31bcd984413009c1cadedcc641b7\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-屏幕快照\",\"configCode\":\"screenShotManage\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":92,\"remark\":\"考中-云考试客户端、云考试app是否支持屏幕快照，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"c0c6471e774f604b1dece8d1165171c6\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"开启设备检测跳过申请\",\"configCode\":\"applyDeviceCheck\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":18,\"remark\":\"视频监控设置-开启设备检测跳过申请,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"c5305258ecddd85be4f736a96fd28997\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"切屏交卷\",\"configCode\":\"overScreenCommit\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":62,\"remark\":\"考中-切屏交卷,1表示是，0表示\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"c60897b84f6556bba7aca2bf7685b2ad\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"试题乱序设置\",\"configCode\":\"questionsDisorderSet\",\"configValue\":\"true\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":11,\"remark\":\"考中-试题乱序设置,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"cac509fb846404e65fcef4e9d5a2e758\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"考试中-设备检测-云考试app考试-网络检测\",\"configCode\":\"checkAppNetwork\",\"configValue\":\"false\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":94,\"remark\":\"考中-是否开启网络检测，1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"cba6fe6c9e4c12afd7754e4fdbb02ace\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"考试模式\",\"configCode\":\"examMode\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":1,\"remark\":\"考前-是否设置为考试模式,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"d40a72dab8372e98f13e059d648f8b09\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"移动端视频回放\",\"configCode\":\"videoAppPlayBack\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":41,\"remark\":\"视频监控设置-是否开启移动端视频回放,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"d9787bd9ad56256241833195ef853ebb\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"身份证号登录\",\"configCode\":\"idCardLogin\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":48,\"remark\":\"考前-是否设置为身份证号登录,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"da9c806632c720e27bd1180067d7a0ac\",\"configType\":\"exam_beofre\",\"configAttribute\":\"checkbox\",\"configName\":\"限制身份证号唯一\",\"configCode\":\"idCardUnique\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":50,\"remark\":\"考前-是否设置身份证号唯一,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"e771305237c1bca9f1adcf4f0c42f7e3\",\"configType\":\"exam_before\",\"configAttribute\":\"checkbox\",\"configName\":\"开启在线客服\",\"configCode\":\"onLineService\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":35,\"remark\":\"考前-是否开启在线客服,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"e7a6f9850695ca8ed97e85fb1b42be1e\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"开启乱序排除题型\",\"configCode\":\"disorderSetExcludeItemType\",\"configValue\":\"false\",\"configGroup\":\"0\",\"iconClass\":null,\"isVisible\":true,\"sort\":19,\"remark\":\"\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"e80411d6ee65fc4777fc47a0ceaf81f7\",\"configType\":\"exam_on\",\"configAttribute\":\"checkbox\",\"configName\":\"乱序设置\",\"configCode\":\"disorderSet\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":10,\"remark\":\"考中-乱序设置,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"eab8e95c123f8ff8a3bf6c43ef1b76e1\",\"configType\":\"exam_on\",\"configAttribute\":\"number\",\"configName\":\"切换屏幕次数\",\"configCode\":\"overScreenNumber\",\"configValue\":\"0\",\"configGroup\":\"\",\"iconClass\":\"\",\"isVisible\":true,\"sort\":3,\"remark\":\"考中-允许切换屏幕的次数\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"eb6f045a36463e13e872d3095ab8ec65\",\"configType\":\"exam_after\",\"configAttribute\":\"checkbox\",\"configName\":\"查看成绩\",\"configCode\":\"viewScore\",\"configValue\":\"false\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-search\",\"isVisible\":true,\"sort\":5,\"remark\":\"考后-是否允许查看成绩,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"f290f8f95b12defdaac2d2025306c650\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"报名照片\",\"configCode\":\"enrollPhoto\",\"configValue\":\"false\",\"configGroup\":\"\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":27,\"remark\":\"视频监控设置-是否开启报名照片片对比,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"f83d9dbb87e40610722cc6d31c3005d3\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"视频设备检测\",\"configCode\":\"videoDeviceCheck\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":\"el-icon-edit-outline\",\"isVisible\":true,\"sort\":18,\"remark\":\"视频监控设置-是否开启视频设备检测,1表示是，0表示否\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"f8eb306441d0b5437c73a73fc99d24d9\",\"configType\":\"video_monitoring\",\"configAttribute\":\"text\",\"configName\":\"移动监控设备开启飞行模式提醒信息\",\"configCode\":\"appFlightModeRemind\",\"configValue\":\"\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":39,\"remark\":\"视频监控设置-自定义移动监控设备开启飞行模式提醒信息（60个字）\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"fed19dafd03d6dccc37f0fa02900a3d1\",\"configType\":\"video_monitoring\",\"configAttribute\":\"checkbox\",\"configName\":\"交卷后延时监控\",\"configCode\":\"delayMonitorVideo\",\"configValue\":\"true\",\"configGroup\":\"1\",\"iconClass\":null,\"isVisible\":true,\"sort\":25,\"remark\":\"交卷后延时监控设置-是否开启\",\"taskId\":null,\"isDelFlag\":false},{\"id\":\"ff30cf0031d70b7305d4b37e2f0308d0\",\"configType\":\"video_monitoring\",\"configAttribute\":\"number\",\"configName\":\"移动监控设备开启飞行模式提醒间隔分钟数\",\"configCode\":\"appFlightModeRemindMins\",\"configValue\":\"2\",\"configGroup\":null,\"iconClass\":null,\"isVisible\":true,\"sort\":43,\"remark\":\"视频监控设置-自定义移动监控设备开启飞行模式提醒间隔分钟数\",\"taskId\":null,\"isDelFlag\":false}]";
        List<ZjwExamDTO> zjwExamDTOList = new ArrayList<>();
        List<ZjwKwapDTO> zjwKwapDTOList = new ArrayList<>();
        List<ZjwExamStudentDTO> zjwExamStudentDTOList = new ArrayList<>();
        redisTemplate.opsForValue().set("zjw","10");
        Integer z = 0;
        for (ZjwExamVO zjwExam : zjwExamList) {
            //创建考试任务
            TaskInfoParam taskInfoParam = new TaskInfoParam();
            TaskInfoVO taskInfoVO = new TaskInfoVO();
            taskInfoVO.setName("上海住建委" + zjwExam.getGw() + "考试" + zjwExam.getYdksrq().replaceAll("-", ""));
            taskInfoVO.setExamType("1");
            taskInfoVO.setDataSource(3);
            taskInfoVO.setTestClassify("dc106af49a6749a9b5fb42aa1bf1cb04");
            taskInfoVO.setBeginDate(LocalDateTime.parse((zjwExam.getYdksrq() + " 00:00:00"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
            taskInfoVO.setEndDate(LocalDateTime.parse((zjwExam.getYdksrq() + " 23:59:59"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
            taskInfoParam.setTaskInfoVO(taskInfoVO);
            List<TaskOnLineConfig> taskOnLineConfig = JSON.parseArray(onLineConfigStr, TaskOnLineConfig.class);
            taskInfoParam.setTaskOnLineConfig(taskOnLineConfig);
            TaskInfoExtParam taskInfoExt = new TaskInfoExtParam();
            taskInfoExt.setWelcomeWords("欢迎参加上海住建委考试");
            TaskInfoParam taskInfoParamQuery = iTaskService.getTaskInfoParam("", officeId);
            taskInfoExt.setExamNotice(taskInfoParamQuery.getTaskInfoExt().getExamNotice());
            taskInfoParam.setTaskInfoExt(taskInfoExt);
            taskInfoParam.setUser(user);
            String taskId = iTaskService.addOrUpdateTaskConfig(taskInfoParam);
            ZjwExamDTO zjwExamDTO = new ZjwExamDTO();
            zjwExamDTO.setExamCode(zjwExam.getExamCode());
            zjwExamDTO.setTaskId(taskId);
            zjwExamDTO.setResultData(JSON.toJSONString(zjwExam));
            zjwExamDTOList.add(zjwExamDTO);
            //获取考务安排
            List<KWAPVO> kWAPList = this.selectKWAP(zjwSelectKWAPAppKey, sid , zjwExam.getExamCode(), requestUrl);
            for (KWAPVO kWAPVO : kWAPList) {
                //添加科目
                SubjectParam subjectParam = new SubjectParam();
                subjectParam.setTaskId(taskId);
                subjectParam.setCode(kWAPVO.getXh());
                subjectParam.setName(kWAPVO.getXh());
                subjectParam.setRemindTime("1");
                subjectParam.setLength("1");
                subjectParam.setHandInTime("1");
                subjectParam.setDeptId(officeId);
                subjectParam.setRoomTypeId("ZZZZZZZZZZA141739336474065522986");
                iSubjectService.add(subjectParam, user);
                //添加批次
                List<Subject> subjectList = iSubjectService.getSubjectByTaskId(taskId);
                String subjectId = "";
                Optional<Subject> subject = subjectList.stream().filter(s -> s.getTaskId().equals(taskId) && s.getName().equals(kWAPVO.getXh())).findFirst();
                if(subject.isPresent()) {
                    subjectId = subject.get().getId();
                }
                TimeParam timeParam = new TimeParam();
                timeParam.setTaskId(taskId);
                //timeParam.setSubjectIds(subjectId);
                timeParam.setStartTime(LocalDateTime.parse((kWAPVO.getKsrq() + " " + kWAPVO.getKssj()), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                timeParam.setEndTime(LocalDateTime.parse((kWAPVO.getKsrq() + " " + kWAPVO.getJssj()), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                timeParam.setName(kWAPVO.getXh());
                timeParam.setRoomMix(true);
                iTimeService.addOrUpdate(timeParam, user);

                String timeId = "";
                List<Time> timeList = iTimeService.getByTaskId(taskId);
                Optional<Time> time = timeList.stream().filter(s -> s.getTaskId().equals(taskId) && s.getName().equals(kWAPVO.getXh())).findFirst();
                if(time.isPresent()) {
                    timeId = time.get().getId();
                }

                TimeSubject timeSubject = new TimeSubject();
                timeSubject.setTimeId(timeId);
                timeSubject.setSubjectId(subjectId);
                timeSubject.setTaskId(taskId);
                iTimeSubjectService.save(timeSubject);

                //推送批次给考试
                PushTimeSubjectParam pushTimeSubjectParam = new PushTimeSubjectParam();
                List<PushKsSubjectParam> subjects = new ArrayList<>();
                PushKsSubjectParam pushKsSubjectParam = new PushKsSubjectParam();
                pushKsSubjectParam.setSubjectId(subjectId);
                pushKsSubjectParam.setSubjectName(kWAPVO.getXh());
               // pushKsSubjectParam.setDeptId(user.getOfficeid());
               // pushKsSubjectParam.setOfficeId(user.getOfficeid());
                subjects.add(pushKsSubjectParam);
                pushTimeSubjectParam.setTimeId(timeId);
                pushTimeSubjectParam.setTaskId(taskId);
                pushTimeSubjectParam.setSubjects(subjects);
                ApiResponse<Object> response = ksClient.pushTimeSubject(pushTimeSubjectParam);

                ZjwKwapDTO zjwKwapDTO = new ZjwKwapDTO();
                zjwKwapDTO.setTaskId(taskId);
                zjwKwapDTO.setExamId(timeId);
                zjwKwapDTO.setExamCode(zjwExam.getExamCode());
                zjwKwapDTO.setSerialNumber(kWAPVO.getXh());
                zjwKwapDTO.setResultData(JSON.toJSONString(kWAPVO));
                zjwKwapDTOList.add(zjwKwapDTO);

                for (Integer i= kWAPVO.getZkzStart(); i <= kWAPVO.getZkzEnd(); i += 200) {
                    Integer zkzEnd = i + 199;
                    zkzEnd =  zkzEnd .intValue() > kWAPVO.getZkzEnd().intValue() ? kWAPVO.getZkzEnd() : zkzEnd;
                    List<ExamStudentVO> examStudentList = this.selectExamStudent(zjwSelectExamStudentAppKey, sid, zjwExam.getExamCode(), kWAPVO.getKwapCode(), i, zkzEnd, requestUrl);
                    List<Candidate> candidateList = new ArrayList<>();
                    List<CandidateSubject> candidateSubjectList = new ArrayList<>();
                    List<CustomArrange> customArrangeList = new ArrayList<>();
                    for (ExamStudentVO examStudent : examStudentList) {
                        //考生表
                        Candidate candidate = new Candidate();
                        String candidateId = UUIDUtils.newSortUUID();
                        candidate.setTaskId(taskId);
                        candidate.setId(candidateId);
                        candidate.setDeptId(officeId);
                        candidate.setOfficeId(officeId);
                        candidate.setName(examStudent.getXm());
                        candidate.setSex(1);
                        candidate.setIdType(0);
                        candidate.setIdNumber(examStudent.getZjh());
                        candidate.setImportType(0);
                        candidateList.add(candidate);
                        //考生科目表
                        CandidateSubject candidateSubject = new CandidateSubject();
                        candidateSubject.setId(UUIDUtils.newSortUUID());
                        candidateSubject.setSubjectId(subjectId);
                        candidateSubject.setAnswerType(1);
                        candidateSubject.setLanguage(1);
                        candidateSubject.setCandidateId(candidateId);
                        candidateSubject.setTaskId(taskId);
                        candidateSubjectList.add(candidateSubject);
                        //自定义准考证表
                        CustomArrange customArrange = new CustomArrange();
                        customArrange.setId(UUIDUtils.newSortUUID());
                        customArrange.setAdmissionNumber(examStudent.getZkz());
                        customArrange.setCandidateId(candidateId);
                        customArrange.setTaskId(taskId);
                        //customArrange.setTimeId(timeId);
                        customArrangeList.add(customArrange);

                        ZjwExamStudentDTO zjwExamStudentDTO = new ZjwExamStudentDTO();
                        zjwExamStudentDTO.setExamCode(zjwExam.getExamCode());
                        zjwExamStudentDTO.setTaskId(taskId);
                        zjwExamStudentDTO.setExamId(timeId);
                        zjwExamStudentDTO.setExamStudentCode(examStudent.getExamStudentCode());
                        zjwExamStudentDTO.setGovCandidateId(candidateId);
                        zjwExamStudentDTO.setStudentName(examStudent.getXm());
                        zjwExamStudentDTO.setStudentAdmission(examStudent.getZkz());
                        zjwExamStudentDTO.setIdCard(examStudent.getZjh());
                        zjwExamStudentDTO.setSubjectCode(zjwExam.getKskmList().get(0).getKmCode());
                        zjwExamStudentDTO.setResultData(JSON.toJSONString(examStudent));
                        zjwExamStudentDTOList.add(zjwExamStudentDTO);
                    }
                    iCandidateService.saveBatch(candidateList);
                    iCandidateSubjectService.saveBatch(candidateSubjectList);
                    iCustomArrangeService.saveBatch(customArrangeList);
                }
            }
            if (z.intValue() < zjwExamList.size() - 1) {
                String zjwProcess = (String) redisTemplate.opsForValue().get("zjw");
                Integer tmpProcess = Integer.parseInt(zjwProcess);
                if (tmpProcess.intValue() < 80) {
                    tmpProcess += 20;
                    redisTemplate.opsForValue().set("zjw",tmpProcess.toString());
                }

            }
            if (z.intValue() == zjwExamList.size() - 1) {
                redisTemplate.opsForValue().set("zjw", "100");
            }
            z++;
        }
        customerthirdClient.saveExam(zjwExamDTOList);
        customerthirdClient.saveKwap(zjwKwapDTOList);
        ExamStudentDTO examStudent = new ExamStudentDTO();
        examStudent.setZjwExamStudentList(zjwExamStudentDTOList);
        customerthirdClient.saveExamStudent(examStudent);
    }

    private List<ZjwExamVO> getSelectExam(String appKey, String sid, String requestUrl, String gwfl) {
        List<ZjwExamVO> zjwExamList = new ArrayList<>();
        SelectExamRequestVO examRequest = new SelectExamRequestVO();
        examRequest.setAppkey(appKey);
        examRequest.setSid(sid);
        examRequest.setGwfl(gwfl);
        examRequest.setGwml("三类人员");
        examRequest.setKslb("初证");
        requestUrl += "/api/selectExam";
        String response = govTpsClient.selectExam(requestUrl, JSON.toJSONString(examRequest));
        SelectExamVO selectExam = JSON.parseObject(response, SelectExamVO.class);
        if(selectExam.getSuccess()) {
            zjwExamList = selectExam.getData();
        }
        return zjwExamList;
    }

    private List<KWAPVO> selectKWAP(String appKey, String sid, String examCode, String requestUrl) {
        List<KWAPVO> kWAPList = new ArrayList<>();
        SelectKWAPRequestVO selectKWAPRequest = new SelectKWAPRequestVO();
        selectKWAPRequest.setAppkey(appKey);
        selectKWAPRequest.setSid(sid);
        selectKWAPRequest.setExamCode(examCode);
        requestUrl += "/api/selectKWAP";
        String response = govTpsClient.selectKWAP(requestUrl, JSON.toJSONString(selectKWAPRequest));
        SelectKWAPVO selectKWAPVO = JSON.parseObject(response, SelectKWAPVO.class);
        if(selectKWAPVO.getSuccess()) {
            kWAPList = selectKWAPVO.getData();
        }
        return kWAPList;
    }

    private List<ExamStudentVO> selectExamStudent(String appKey, String sid, String examCode, String kwapCode, Integer zkzStart, Integer zkzEnd, String requestUrl) {
        List<ExamStudentVO> examStudentList = new ArrayList<>();
        SelectExamStudentRequestVO selectExamStudentRequestVO = new SelectExamStudentRequestVO();
        selectExamStudentRequestVO.setAppkey(appKey);
        selectExamStudentRequestVO.setSid(sid);
        selectExamStudentRequestVO.setKwapCode(kwapCode);
        selectExamStudentRequestVO.setExamCode(examCode);
        selectExamStudentRequestVO.setZkzStart(zkzStart);
        selectExamStudentRequestVO.setZkzEnd(zkzEnd);
        requestUrl += "/api/selectExamStudent";
        String response = govTpsClient.selectExamStudent(requestUrl, JSON.toJSONString(selectExamStudentRequestVO));
        SelectExamStudentVO selectExamStudent = JSON.parseObject(response, SelectExamStudentVO.class);
        if(selectExamStudent.getSuccess()) {
            examStudentList = selectExamStudent.getData();
        }
        return examStudentList;
    }

    @Override
    public Boolean pushCjToZjw(InsertExamStudentScoreRequestVO insertExamStudentScoreRequest) {
        String appKey = configManager.getZjwInsertExamStudentScoreAppKey();
        String sid = configManager.getZjwSid();
        String requestUrl = configManager.getZjwRequestUrl();
        insertExamStudentScoreRequest.setAppkey(appKey);
        insertExamStudentScoreRequest.setSid(sid);


        requestUrl += "/api/insertExamStudentScore";
        String response = govTpsClient.insertExamStudentScore(requestUrl, JSON.toJSONString(insertExamStudentScoreRequest));
        log.info("推送住建委成绩返回结果: 【{}】", response);
        InsertExamStudentScoreResultVO insertExamStudentScoreResult = JSON.parseObject(response, InsertExamStudentScoreResultVO.class);
        return insertExamStudentScoreResult.getSuccess();
    }

    @Override
    public String getZjwProgess() {
        return (String) redisTemplate.opsForValue().get("zjw");
    }

}
